package org.innovasix.educational.javap.domain.constantpool;

import org.innovasix.educational.javap.domain.datatypes.cp_info;
import org.innovasix.educational.javap.domain.datatypes.u1;
import org.innovasix.educational.javap.domain.datatypes.u2;
import org.innovasix.educational.javap.domain.datatypes.u4;
import org.innovasix.educational.javap.domain.parser.ByteQueue;

/**
 * <p>
 * <b><i>From the JVM specification:</i></b><br/>
 * The Constant_Class_info structure is used to represent a class or an
 * interface.
 * </p>
 * 
 * @see <a
 *      href="http://docs.oracle.com/javase/specs/jvms/se7/html/jvms-4.html#jvms-4.4.1">4.4.1.
 *      The CONSTANT_Class_info Structure</a>
 * 
 * @author sven.mentl@gmail.com
 * 
 */
public class CONSTANT_Float_info extends cp_info {

	public CONSTANT_Float_info(ByteQueue byteQueue) {
		bytes = byteQueue.pollFourBytes(CONSTANT_Float_info.class.getCanonicalName());
	}

	/**
	 * <p>
	 * <b><i>From the JVM specification:</i></b><br/>
	 * The tag item has the value CONSTANT_Float(4).
	 * </p>
	 */
	final u1 tag = new u1(ConstantPoolTags.CONSTANT_Float.decimalValue());

	/**
	 * <p>
	 * <b><i>From the JVM specification:</i></b><br/>
	 * The bytes item of the CONSTANT_Float_info structure represents the value of the 
	 * float constant in IEEE754 floating-point single format.
	 * The bytes of the value are stored in big-endian (high byte first) order.
	 * </p>
	 */
	u4 bytes;

}
